
#include"protocol.h"

#define CurrentClient    OrderClient

#define NoServering      0  //未服务
#define OnServering	 1  //正在服务

#define IsSuccess	 "ok"  //
#define IsFaile		 "fail"


struct FoodList{
    ushort FoodNum;//编号
    ushort FoodSum;//数量
    char Remark[RemarkSize];//备注
    struct FoodList *next;
    struct FoodList *pre;
};


class CustomerClient{
    public:
	CustomerClient();
	~CustomerClient();

	void ConnetServer();

	void SendMessage();

	void ReceiveMessage();

	void MainMenu();

	void OrderTable();

	void OrderFood();

	void ChangeFood();

	void CallWaiter();

	void SendOrder();

	void Account();

	void ShowServeringFoodList();

	void ShowMyOrder();

	void ShowChangeList();

	void ShowServeringTable();
   private:
	int socket_fd;
	sockaddr_in ServerSin;
	ushort ServeringStatus;//服务状态0未服务，1正在服务
	MessageHeader Msg;
	map<ushort,string> OrderingTable;//桌号-称呼
	map<ushort,string> ServeringTable;//桌号-称呼
	map<ushort,map<ushort,string>> Servering;//菜编号-价格-备注
	FoodList *OrderList;
	FoodList *ChangeList;
};
